/**
 * 
 */
package name.marz.to.go.btree.ui.swing;

import java.awt.event.ActionListener;

import javax.swing.JButton;
import javax.swing.JPanel;
import javax.swing.JTextField;

/**
 * @author masaru-gotou
 *
 */
public class InsertControlPanel extends JPanel {
	/**
	 * 
	 */
	private static final long serialVersionUID = 1L;
	private JTextField key;
	private JTextField value;
	private JButton btn;
	
	public InsertControlPanel() {
		key = new JTextField(5);
		key.setToolTipText("key");
		value = new JTextField(10);
		value.setToolTipText("value");
		btn = new JButton("Insert");
		btn.setToolTipText("Action Insert");
		
		add(key);
		add(value);
		add(btn);
	}
	
	public String getKey() {
		return key.getText();
	}
	public String getValue() {
		return value.getText();
	}
	
	public void addInsertActionListener(ActionListener l) {
		btn.addActionListener(l);
	}

}
